<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>DN_HELP</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../styles/styles.css">
<script language="javascript" src='../../links.js' type="text/javascript"></script>
</head>
<body>

<h1>DN_HELP</h1>
<div class=navbar>
<a  href="index_dn.html">Events</a> |
<a href="../index.html">Dialog API</a><br>
</div>

<div class=shortdescr>
The <dfn>DN_HELP</dfn> event is sent to the dialog callback function before a help topic is
displayed.
</div>

<h3>Param1</h3>
<div class=descr>
ID of the dialog item that has the keyboard focus.
</div>

<h3>Param2</h3>
<div class=descr>
Pointer to a string containing the <a href="../../language/helptopic.html">name of a help topic</a>
that the dialog callback function wants to display.
</div>

<h3>Return</h3>
<div class=descr>
Pointer to a string containing the name of a help topic that the dialog callback function should
display. If NULL is returned, no help topic will be displayed.
</div>

<h3>Controls</h3>
<div class=descr>
<table class="cont">
<tr class="cont"><th class="cont" width="40%">Control</th><th class="cont" width="60%">Description</th></tr>
<tr class="cont"><td class="cont" width="40%">All</td>
<td class="cont" width="60%">All elements that can receive <a href="../keybfocus.html">keyboard focus</a>.</td></tr>
</table>
</div>

<h3>Remarks</h3>
<div class=descr>
This event allows to control which help topic will be displayed based on the current dialog item.
</div>

<h3>Example</h3>
<div class=descr>
<pre class=code>
// based on the state of the game select which help topic to display
// in this case the current dialog item is if no matter to us
case DN_HELP:
{
  static char *HelpTopics[3]={"Contents","Rule","Recommendations"};
  int i=1;
  if(GAME[0].NumPl1==2 &amp;&amp; GAME[0].NumPl2 == 2)
    i=0;
  else if(GAME[0].NumPl1+GAME[0].NumPl2 &gt; 16)
    i=2;
  return (LONG_PTR)(&amp;HelpTopics[i][0]);
}
</pre>
</div>


<div class=see>See also:</div><div class=seecont>
<a href="../dialogex.html">DialogEx</a>
</div>

</body>
</html>
